package cn.zhaolinbo.service;

import cn.zhaolinbo.dao.SpringBootDao;
import cn.zhaolinbo.dao.SpringBootDao2;
import cn.zhaolinbo.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

/**
 * Created by zhaolinbo on 2017/10/31.
 */
@Service
@Transactional
public class SpringBootServiceImpl implements SpringBootService {
    //注入dao
    @Autowired
    private SpringBootDao springBootDao;
    //注入springBootDao2
    @Autowired
    private SpringBootDao2 springBootDao2;
    @Override
    public void save1(User user) {

        springBootDao.save(user);
    }

    @Override
    public void save2(User user) {
        springBootDao2.save(user);
    }
}
